//
//  ZPMineHelpCenterViewController.m
//  ZPIOSEducation
//
//  Created by 李伟 on 2016/12/4.
//  Copyright © 2016年 mini1. All rights reserved.
//

#import "ZPMineHelpCenterViewController.h"

@interface ZPMineHelpCenterViewController ()<UIWebViewDelegate>

@property (weak, nonatomic) IBOutlet UIWebView *mWebView;

@end

@implementation ZPMineHelpCenterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.mWebView.delegate = self;
    
    [self setupNavigationItem];
    [self setupViewWithNib];
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];

}

#pragma mark - <setupNavigationItem>
- (void)setupNavigationItem {
    self.navigationItem.title = @"帮助中心";
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"zhenpin_back"] style:UIBarButtonItemStylePlain target:self action:@selector(clickBackButtonItem)];
}

#pragma mark - <setupViewWithNib>
- (void)setupViewWithNib {
    self.view = [[[NSBundle mainBundle] loadNibNamed:@"ZPMineHelpCenterViewController" owner:self options:nil] lastObject];
    NSURLRequest  *request = [NSURLRequest  requestWithURL:[NSURL  URLWithString:[NSString  stringWithFormat:@"%@",APICOMMUNITY@"index.php/page/index/1"]]];
    [self  showHudithString:@"加载中..."];
    [self.mWebView  loadRequest:request];
    
}

- (void)clickBackButtonItem {
    
    if ([self.mWebView  canGoBack]) {
        [self.mWebView  goBack];
    }else {
        [self.navigationController  popViewControllerAnimated:YES];
    }
}

- (IBAction)howSignupClick:(id)sender {
}
- (IBAction)howChangeGradeClick:(id)sender {
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
